package sv.gob.mh.dgii.service.ed;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sv.gob.mh.dgii.dao.ed.EdDatoF11Dao;
import sv.gob.mh.dgii.model.EdDatoF11;
import sv.gob.mh.dgii.model.EdDatoF11Id;
import sv.gob.mh.dgii.service.BaseService;

@Service
public class EdDatoF11ServiceImpl extends BaseService implements EdDatoF11Service {

    @Autowired
    EdDatoF11Dao edDatoF11Dao;
    Log log = LogFactory.getLog(EdDatoF11ServiceImpl.class);

    @Override
    public EdDatoF11Dao getDao() {
        return edDatoF11Dao;
    }

    public EdDatoF11 findByEdDatoF11Id(EdDatoF11Id id) {
        return edDatoF11Dao.findByEdDatoF11Id(id);
    }

    @Override
    public void updateEstadoWithProcedure(String nit, String periodo) throws Exception {
        edDatoF11Dao.updateEstadoWithProcedure(nit, periodo);
        edDatoF11Dao.synchronize();
    }

    }